home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / toobin.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  20KB  |  529 lines

  1. /***************************************************************************
  2.  
  3. Toobin Memory Map (preliminary)
  4. -------------------------------
  5.  
  6. driver by Aaron Giles
  7.  
  8. TOOBIN' 68010 MEMORY MAP
  9.  
  10. Function                           Address        R/W  DATA
  11. -------------------------------------------------------------
  12. Program ROM                        000000-07FFFF  R    D0-D15
  13.  
  14. Playfield RAM                      C00000-C07FFF  R/W  D0-D15
  15. Alphanumerics RAM                  C08000-C097FF  R/W  D0-D15
  16. Motion Object RAM                  C09800-C09FFF  R/W  D0-D15
  17.  
  18. Color RAM Playfield                C10000-C101FF  R/W  D0-D15
  19. Color RAM Motion Object            C10200-C103FF  R/W  D0-D15
  20. Color RAM Alpha                    C10400-C105FF  R/W  D0-D15
  21. Color RAM Extra?                   C10600-C107FF  R/W  D0-D15
  22.  
  23. ???? (Dip switches?)               FF6000         R
  24.  
  25. Watchdog reset                     FF8000-FF8001  W    xx
  26. 68000-to-6502 data                 FF8101         W    D0-D7
  27. Video intensity (0=max, 1f=min)    FF8300         W    D0-D4
  28. Scan line of next interrupt        FF8340         W    D0-D8
  29. Head of motion object list         FF8380         W    D0-D7
  30. Interrupt acknowledge              FF83C0-FF83C1  W    xx
  31. Sound chip reset                   FF8400-FF8401  W    D0
  32. EEPROM output enable               FF8500-FF8501  W    xx
  33.  
  34. Horizontal scroll register         FF8600-FF8601  W    D6-D15
  35. Vertical scroll register           FF8700-FF8701  W    D6-D15
  36.  
  37. Player 2 Throw                     FF8800-FF8801  R    D9
  38. Player 1 Throw                                    R    D8
  39. Player 1 Paddle Forward (Right)                   R    D7
  40. Player 1 Paddle Forward (Left)                    R    D6
  41. Player 1 Paddle Backward (Left)                   R    D5
  42. Player 1 Paddle Backward (Right)                  R    D4
  43. Player 2 Paddle Forward (Right)                   R    D3
  44. Player 2 Paddle Forward (Left)                    R    D2
  45. Player 2 Paddle Backward (Left)                   R    D1
  46. Player 2 Paddle Backward (Right)                  R    D0
  47.  
  48. VBLANK                             FF9000         R    D14
  49. Output buffer full (at FF8101)                    R    D13
  50. Self-test                                         R    D12
  51.  
  52. 6502-to-68000 data                 FF9801         R    D0-D7
  53.  
  54. EEPROM                             FFA000-FFAFFF  R/W  D0-D7
  55.  
  56. Program RAM                        FFC000-FFFFFF  R/W  D0-D15
  57.  
  58. ****************************************************************************/
  59.  
  60. #include "driver.h"
  61. #include "machine/atarigen.h"
  62. #include "sndhrdw/atarijsa.h"
  63. #include "vidhrdw/generic.h"
  64.  
  65.  
  66. extern UINT8 *toobin_intensity;
  67. extern UINT8 *toobin_moslip;
  68.  
  69. static UINT8 *interrupt_scan;
  70.  
  71.  
  72. WRITE_HANDLER( toobin_moslip_w );
  73. WRITE_HANDLER( toobin_paletteram_w );
  74. WRITE_HANDLER( toobin_playfieldram_w );
  75.  
  76. int toobin_vh_start(void);
  77. void toobin_vh_stop(void);
  78. void toobin_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  79.  
  80. void toobin_scanline_update(int scanline);
  81.  
  82.  
  83.  
  84. /*************************************
  85.  *
  86.  *    Initialization
  87.  *
  88.  *************************************/
  89.  
  90. static void update_interrupts(void)
  91. {
  92.     int newstate = 0;
  93.  
  94.     if (atarigen_scanline_int_state)
  95.         newstate |= 1;
  96.     if (atarigen_sound_int_state)
  97.         newstate |= 2;
  98.  
  99.     if (newstate)
  100.         cpu_set_irq_line(0, newstate, ASSERT_LINE);
  101.     else
  102.         cpu_set_irq_line(0, 7, CLEAR_LINE);
  103. }
  104.  
  105.  
  106. static void init_machine(void)
  107. {
  108.     atarigen_eeprom_reset();
  109.     atarigen_interrupt_reset(update_interrupts);
  110.     atarigen_scanline_timer_reset(toobin_scanline_update, 8);
  111.     atarijsa_reset();
  112. }
  113.  
  114.  
  115.  
  116. /*************************************
  117.  *
  118.  *    Interrupt handlers.
  119.  *
  120.  *************************************/
  121.  
  122. static WRITE_HANDLER( interrupt_scan_w )
  123. {
  124.     int oldword = READ_WORD(&interrupt_scan[offset]);
  125.     int newword = COMBINE_WORD(oldword, data);
  126.  
  127.     /* if something changed, update the word in memory */
  128.     if (oldword != newword)
  129.     {
  130.         WRITE_WORD(&interrupt_scan[offset], newword);
  131.         atarigen_scanline_int_set(newword & 0x1ff);
  132.     }
  133. }
  134.  
  135.  
  136.  
  137. /*************************************
  138.  *
  139.  *    I/O read dispatch
  140.  *
  141.  *************************************/
  142.  
  143. static READ_HANDLER( special_port1_r )
  144. {
  145.     int result = input_port_1_r(offset);
  146.     if (atarigen_get_hblank()) result ^= 0x8000;
  147.     if (atarigen_cpu_to_sound_ready) result ^= 0x2000;
  148.     return result;
  149. }
  150.  
  151.  
  152.  
  153. /*************************************
  154.  *
  155.  *    Main CPU memory handlers
  156.  *
  157.  *************************************/
  158.  
  159. static struct MemoryReadAddress main_readmem[] =
  160. {
  161.     { 0x000000, 0x07ffff, MRA_ROM },
  162.     { 0xc00000, 0xc07fff, MRA_BANK1 },
  163.     { 0xc08000, 0xc097ff, MRA_BANK2 },
  164.     { 0xc09800, 0xc09fff, MRA_BANK3 },
  165.     { 0xc10000, 0xc107ff, paletteram_word_r },
  166.     { 0xff6000, 0xff6001, MRA_NOP },        /* who knows? read at controls time */
  167.     { 0xff8800, 0xff8801, input_port_0_r },
  168.     { 0xff9000, 0xff9001, special_port1_r },
  169.     { 0xff9800, 0xff9801, atarigen_sound_r },
  170.     { 0xffa000, 0xffafff, atarigen_eeprom_r },
  171.     { 0xffc000, 0xffffff, MRA_BANK7 },
  172.     { -1 }  /* end of table */
  173. };
  174.  
  175.  
  176. static struct MemoryWriteAddress main_writemem[] =
  177. {
  178.     { 0x000000, 0x07ffff, MWA_ROM },
  179.     { 0xc00000, 0xc07fff, toobin_playfieldram_w, &atarigen_playfieldram, &atarigen_playfieldram_size },
  180.     { 0xc08000, 0xc097ff, MWA_BANK2, &atarigen_alpharam, &atarigen_alpharam_size },
  181.     { 0xc09800, 0xc09fff, MWA_BANK3, &atarigen_spriteram, &atarigen_spriteram_size },
  182.     { 0xc10000, 0xc107ff, toobin_paletteram_w, &paletteram },
  183.     { 0xff8000, 0xff8001, watchdog_reset_w },
  184.     { 0xff8100, 0xff8101, atarigen_sound_w },
  185.     { 0xff8300, 0xff8301, MWA_BANK4, &toobin_intensity },
  186.     { 0xff8340, 0xff8341, interrupt_scan_w, &interrupt_scan },
  187.     { 0xff8380, 0xff8381, toobin_moslip_w, &toobin_moslip },
  188.     { 0xff83c0, 0xff83c1, atarigen_scanline_int_ack_w },
  189.     { 0xff8400, 0xff8401, atarigen_sound_reset_w },
  190.     { 0xff8500, 0xff8501, atarigen_eeprom_enable_w },
  191.     { 0xff8600, 0xff8601, MWA_BANK5, &atarigen_hscroll },
  192.     { 0xff8700, 0xff8701, MWA_BANK6, &atarigen_vscroll },
  193.     { 0xffa000, 0xffafff, atarigen_eeprom_w, &atarigen_eeprom, &atarigen_eeprom_size },
  194.     { 0xffc000, 0xffffff, MWA_BANK7 },
  195.     { -1 }  /* end of table */
  196. };
  197.  
  198.  
  199.  
  200. /*************************************
  201.  *
  202.  *    Port definitions
  203.  *
  204.  *************************************/
  205.  
  206. INPUT_PORTS_START( toobin )
  207.     PORT_START    /* ff8800 */
  208.     PORT_BITX(0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2, "P2 R Paddle Forward", KEYCODE_L, IP_JOY_DEFAULT )
  209.     PORT_BITX(0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2, "P2 L Paddle Forward", KEYCODE_J, IP_JOY_DEFAULT )
  210.     PORT_BITX(0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2, "P2 L Paddle Backward", KEYCODE_U, IP_JOY_DEFAULT )
  211.     PORT_BITX(0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2, "P2 R Paddle Backward", KEYCODE_O, IP_JOY_DEFAULT )
  212.     PORT_BITX(0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1, "P1 R Paddle Forward", KEYCODE_D, IP_JOY_DEFAULT )
  213.     PORT_BITX(0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1, "P1 L Paddle Forward", KEYCODE_A, IP_JOY_DEFAULT )
  214.     PORT_BITX(0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1, "P1 L Paddle Backward", KEYCODE_Q, IP_JOY_DEFAULT )
  215.     PORT_BITX(0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1, "P1 R Paddle Backward", KEYCODE_E, IP_JOY_DEFAULT )
  216.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
  217.     PORT_BITX(0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1, "P1 Throw", KEYCODE_LCONTROL, IP_JOY_DEFAULT )
  218.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
  219.     PORT_BITX(0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2, "P2 Throw", KEYCODE_RCONTROL, IP_JOY_DEFAULT )
  220.     PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
  221.  
  222.     PORT_START    /* ff9000 */
  223.     PORT_BIT( 0x03ff, IP_ACTIVE_LOW, IPT_UNUSED )
  224.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
  225.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
  226.     PORT_SERVICE( 0x1000, IP_ACTIVE_LOW )
  227.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED )
  228.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_VBLANK )
  229.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
  230.  
  231.     JSA_I_PORT    /* audio board port */
  232. INPUT_PORTS_END
  233.  
  234.  
  235.  
  236. /*************************************
  237.  *
  238.  *    Graphics definitions
  239.  *
  240.  *************************************/
  241.  
  242. static struct GfxLayout anlayout =
  243. {
  244.     8,8,    /* 8*8 chars */
  245.     1024,    /* 1024 chars */
  246.     2,        /* 2 bits per pixel */
  247.     { 0, 4 },
  248.     { 0, 1, 2, 3, 8, 9, 10, 11 },
  249.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  250.     8*16    /* every char takes 16 consecutive bytes */
  251. };
  252.  
  253.  
  254. static struct GfxLayout pflayout =
  255. {
  256.     8,8,    /* 8*8 tiles */
  257.     16384,    /* 16384 of them */
  258.     4,        /* 4 bits per pixel */
  259.     { 256*1024*8, 256*1024*8+4, 0, 4 },
  260.     { 0, 1, 2, 3, 8, 9, 10, 11 },
  261.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  262.     8*16    /* every tile takes 16 consecutive bytes */
  263. };
  264.  
  265.  
  266. static struct GfxLayout molayout =
  267. {
  268.     16,16,    /* 16*16 sprites */
  269.     16384,    /* 16384 of them */
  270.     4,        /* 4 bits per pixel */
  271.     { 1024*1024*8, 1024*1024*8+4, 0, 4 },
  272.     { 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27 },
  273.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
  274.     8*64    /* every sprite takes 64 consecutive bytes */
  275. };
  276.  
  277.  
  278. static struct GfxDecodeInfo gfxdecodeinfo[] =
  279. {
  280.     { REGION_GFX1, 0, &pflayout,     0, 16 },
  281.     { REGION_GFX2, 0, &molayout,   256, 16 },
  282.     { REGION_GFX3, 0, &anlayout,   512, 64 },
  283.     { -1 } /* end of array */
  284. };
  285.  
  286.  
  287.  
  288. /*************************************
  289.  *
  290.  *    Machine driver
  291.  *
  292.  *************************************/
  293.  
  294. static struct MachineDriver machine_driver_toobin =
  295. {
  296.     /* basic machine hardware */
  297.     {
  298.         {
  299.             CPU_M68010,        /* verified */
  300.             ATARI_CLOCK_32MHz/4,
  301.             main_readmem,main_writemem,0,0,
  302.             ignore_interrupt,1
  303.         },
  304.         JSA_I_CPU
  305.     },
  306.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  307.     1,
  308.     init_machine,
  309.  
  310.     /* video hardware */
  311.     64*8, 48*8, { 0*8, 64*8-1, 0*8, 48*8-1 },
  312.     gfxdecodeinfo,
  313.     1024,1024,
  314.     0,
  315.  
  316.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  317.     0,
  318.     toobin_vh_start,
  319.     toobin_vh_stop,
  320.     toobin_vh_screenrefresh,
  321.  
  322.     /* sound hardware */
  323.     JSA_I_STEREO_WITH_POKEY,
  324.  
  325.     atarigen_nvram_handler
  326. };
  327.  
  328.  
  329.  
  330. /*************************************
  331.  *
  332.  *    ROM definition(s)
  333.  *
  334.  *************************************/
  335.  
  336. ROM_START( toobin )
  337.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  338.     ROM_LOAD_EVEN( "061-3133.bin", 0x00000, 0x10000, 0x79a92d02 )
  339.     ROM_LOAD_ODD ( "061-3137.bin", 0x00000, 0x10000, 0xe389ef60 )
  340.     ROM_LOAD_EVEN( "061-3134.bin", 0x20000, 0x10000, 0x3dbe9a48 )
  341.     ROM_LOAD_ODD ( "061-3138.bin", 0x20000, 0x10000, 0xa17fb16c )
  342.     ROM_LOAD_EVEN( "061-3135.bin", 0x40000, 0x10000, 0xdc90b45c )
  343.     ROM_LOAD_ODD ( "061-3139.bin", 0x40000, 0x10000, 0x6f8a719a )
  344.     ROM_LOAD_EVEN( "061-1136.bin", 0x60000, 0x10000, 0x5ae3eeac )
  345.     ROM_LOAD_ODD ( "061-1140.bin", 0x60000, 0x10000, 0xdacbbd94 )
  346.  
  347.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  348.     ROM_LOAD( "061-1114.bin", 0x10000, 0x4000, 0xc0dcce1a )
  349.     ROM_CONTINUE(             0x04000, 0xc000 )
  350.  
  351.     ROM_REGION( 0x080000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  352.     ROM_LOAD( "061-1101.bin", 0x000000, 0x10000, 0x02696f15 )  /* bank 0 (4 bpp)*/
  353.     ROM_LOAD( "061-1102.bin", 0x010000, 0x10000, 0x4bed4262 )
  354.     ROM_LOAD( "061-1103.bin", 0x020000, 0x10000, 0xe62b037f )
  355.     ROM_LOAD( "061-1104.bin", 0x030000, 0x10000, 0xfa05aee6 )
  356.     ROM_LOAD( "061-1105.bin", 0x040000, 0x10000, 0xab1c5578 )
  357.     ROM_LOAD( "061-1106.bin", 0x050000, 0x10000, 0x4020468e )
  358.     ROM_LOAD( "061-1107.bin", 0x060000, 0x10000, 0xfe6f6aed )
  359.     ROM_LOAD( "061-1108.bin", 0x070000, 0x10000, 0x26fe71e1 )
  360.  
  361.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  362.     ROM_LOAD( "061-1143.bin", 0x000000, 0x20000, 0x211c1049 )  /* bank 0 (4 bpp)*/
  363.     ROM_LOAD( "061-1144.bin", 0x020000, 0x20000, 0xef62ed2c )
  364.     ROM_LOAD( "061-1145.bin", 0x040000, 0x20000, 0x067ecb8a )
  365.     ROM_LOAD( "061-1146.bin", 0x060000, 0x20000, 0xfea6bc92 )
  366.     ROM_LOAD( "061-1125.bin", 0x080000, 0x10000, 0xc37f24ac )
  367.     ROM_RELOAD(               0x0c0000, 0x10000 )
  368.     ROM_LOAD( "061-1126.bin", 0x090000, 0x10000, 0x015257f0 )
  369.     ROM_RELOAD(               0x0d0000, 0x10000 )
  370.     ROM_LOAD( "061-1127.bin", 0x0a0000, 0x10000, 0xd05417cb )
  371.     ROM_RELOAD(               0x0e0000, 0x10000 )
  372.     ROM_LOAD( "061-1128.bin", 0x0b0000, 0x10000, 0xfba3e203 )
  373.     ROM_RELOAD(               0x0f0000, 0x10000 )
  374.     ROM_LOAD( "061-1147.bin", 0x100000, 0x20000, 0xca4308cf )
  375.     ROM_LOAD( "061-1148.bin", 0x120000, 0x20000, 0x23ddd45c )
  376.     ROM_LOAD( "061-1149.bin", 0x140000, 0x20000, 0xd77cd1d0 )
  377.     ROM_LOAD( "061-1150.bin", 0x160000, 0x20000, 0xa37157b8 )
  378.     ROM_LOAD( "061-1129.bin", 0x180000, 0x10000, 0x294aaa02 )
  379.     ROM_RELOAD(               0x1c0000, 0x10000 )
  380.     ROM_LOAD( "061-1130.bin", 0x190000, 0x10000, 0xdd610817 )
  381.     ROM_RELOAD(               0x1d0000, 0x10000 )
  382.     ROM_LOAD( "061-1131.bin", 0x1a0000, 0x10000, 0xe8e2f919 )
  383.     ROM_RELOAD(               0x1e0000, 0x10000 )
  384.     ROM_LOAD( "061-1132.bin", 0x1b0000, 0x10000, 0xc79f8ffc )
  385.     ROM_RELOAD(               0x1f0000, 0x10000 )
  386.  
  387.     ROM_REGION( 0x004000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  388.     ROM_LOAD( "061-1142.bin", 0x000000, 0x04000, 0xa6ab551f )  /* alpha font */
  389. ROM_END
  390.  
  391.  
  392. ROM_START( toobin2 )
  393.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  394.     ROM_LOAD_EVEN( "061-2133.1j",  0x00000, 0x10000, 0x2c3382e4 )
  395.     ROM_LOAD_ODD ( "061-2137.1f",  0x00000, 0x10000, 0x891c74b1 )
  396.     ROM_LOAD_EVEN( "061-2134.2j",  0x20000, 0x10000, 0x2b8164c8 )
  397.     ROM_LOAD_ODD ( "061-2138.2f",  0x20000, 0x10000, 0xc09cadbd )
  398.     ROM_LOAD_EVEN( "061-2135.4j",  0x40000, 0x10000, 0x90477c4a )
  399.     ROM_LOAD_ODD ( "061-2139.4f",  0x40000, 0x10000, 0x47936958 )
  400.     ROM_LOAD_EVEN( "061-1136.bin", 0x60000, 0x10000, 0x5ae3eeac )
  401.     ROM_LOAD_ODD ( "061-1140.bin", 0x60000, 0x10000, 0xdacbbd94 )
  402.  
  403.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  404.     ROM_LOAD( "061-1114.bin", 0x10000, 0x4000, 0xc0dcce1a )
  405.     ROM_CONTINUE(             0x04000, 0xc000 )
  406.  
  407.     ROM_REGION( 0x080000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  408.     ROM_LOAD( "061-1101.bin", 0x000000, 0x10000, 0x02696f15 )  /* bank 0 (4 bpp)*/
  409.     ROM_LOAD( "061-1102.bin", 0x010000, 0x10000, 0x4bed4262 )
  410.     ROM_LOAD( "061-1103.bin", 0x020000, 0x10000, 0xe62b037f )
  411.     ROM_LOAD( "061-1104.bin", 0x030000, 0x10000, 0xfa05aee6 )
  412.     ROM_LOAD( "061-1105.bin", 0x040000, 0x10000, 0xab1c5578 )
  413.     ROM_LOAD( "061-1106.bin", 0x050000, 0x10000, 0x4020468e )
  414.     ROM_LOAD( "061-1107.bin", 0x060000, 0x10000, 0xfe6f6aed )
  415.     ROM_LOAD( "061-1108.bin", 0x070000, 0x10000, 0x26fe71e1 )
  416.  
  417.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  418.     ROM_LOAD( "061-1143.bin", 0x000000, 0x20000, 0x211c1049 )  /* bank 0 (4 bpp)*/
  419.     ROM_LOAD( "061-1144.bin", 0x020000, 0x20000, 0xef62ed2c )
  420.     ROM_LOAD( "061-1145.bin", 0x040000, 0x20000, 0x067ecb8a )
  421.     ROM_LOAD( "061-1146.bin", 0x060000, 0x20000, 0xfea6bc92 )
  422.     ROM_LOAD( "061-1125.bin", 0x080000, 0x10000, 0xc37f24ac )
  423.     ROM_RELOAD(               0x0c0000, 0x10000 )
  424.     ROM_LOAD( "061-1126.bin", 0x090000, 0x10000, 0x015257f0 )
  425.     ROM_RELOAD(               0x0d0000, 0x10000 )
  426.     ROM_LOAD( "061-1127.bin", 0x0a0000, 0x10000, 0xd05417cb )
  427.     ROM_RELOAD(               0x0e0000, 0x10000 )
  428.     ROM_LOAD( "061-1128.bin", 0x0b0000, 0x10000, 0xfba3e203 )
  429.     ROM_RELOAD(               0x0f0000, 0x10000 )
  430.     ROM_LOAD( "061-1147.bin", 0x100000, 0x20000, 0xca4308cf )
  431.     ROM_LOAD( "061-1148.bin", 0x120000, 0x20000, 0x23ddd45c )
  432.     ROM_LOAD( "061-1149.bin", 0x140000, 0x20000, 0xd77cd1d0 )
  433.     ROM_LOAD( "061-1150.bin", 0x160000, 0x20000, 0xa37157b8 )
  434.     ROM_LOAD( "061-1129.bin", 0x180000, 0x10000, 0x294aaa02 )
  435.     ROM_RELOAD(               0x1c0000, 0x10000 )
  436.     ROM_LOAD( "061-1130.bin", 0x190000, 0x10000, 0xdd610817 )
  437.     ROM_RELOAD(               0x1d0000, 0x10000 )
  438.     ROM_LOAD( "061-1131.bin", 0x1a0000, 0x10000, 0xe8e2f919 )
  439.     ROM_RELOAD(               0x1e0000, 0x10000 )
  440.     ROM_LOAD( "061-1132.bin", 0x1b0000, 0x10000, 0xc79f8ffc )
  441.     ROM_RELOAD(               0x1f0000, 0x10000 )
  442.  
  443.     ROM_REGION( 0x004000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  444.     ROM_LOAD( "061-1142.bin", 0x000000, 0x04000, 0xa6ab551f )  /* alpha font */
  445. ROM_END
  446.  
  447.  
  448. ROM_START( toobinp )
  449.     ROM_REGION( 0x80000, REGION_CPU1 )    /* 8*64k for 68000 code */
  450.     ROM_LOAD_EVEN( "pg-0-up.1j",   0x00000, 0x10000, 0xcaeb5d1b )
  451.     ROM_LOAD_ODD ( "pg-0-lo.1f",   0x00000, 0x10000, 0x9713d9d3 )
  452.     ROM_LOAD_EVEN( "pg-20-up.2j",  0x20000, 0x10000, 0x119f5d7b )
  453.     ROM_LOAD_ODD ( "pg-20-lo.2f",  0x20000, 0x10000, 0x89664841 )
  454.     ROM_LOAD_EVEN( "061-2135.4j",  0x40000, 0x10000, 0x90477c4a )
  455.     ROM_LOAD_ODD ( "pg-40-lo.4f",  0x40000, 0x10000, 0xa9f082a9 )
  456.     ROM_LOAD_EVEN( "061-1136.bin", 0x60000, 0x10000, 0x5ae3eeac )
  457.     ROM_LOAD_ODD ( "061-1140.bin", 0x60000, 0x10000, 0xdacbbd94 )
  458.  
  459.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  460.     ROM_LOAD( "061-1114.bin", 0x10000, 0x4000, 0xc0dcce1a )
  461.     ROM_CONTINUE(             0x04000, 0xc000 )
  462.  
  463.     ROM_REGION( 0x080000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  464.     ROM_LOAD( "061-1101.bin", 0x000000, 0x10000, 0x02696f15 )  /* bank 0 (4 bpp)*/
  465.     ROM_LOAD( "061-1102.bin", 0x010000, 0x10000, 0x4bed4262 )
  466.     ROM_LOAD( "061-1103.bin", 0x020000, 0x10000, 0xe62b037f )
  467.     ROM_LOAD( "061-1104.bin", 0x030000, 0x10000, 0xfa05aee6 )
  468.     ROM_LOAD( "061-1105.bin", 0x040000, 0x10000, 0xab1c5578 )
  469.     ROM_LOAD( "061-1106.bin", 0x050000, 0x10000, 0x4020468e )
  470.     ROM_LOAD( "061-1107.bin", 0x060000, 0x10000, 0xfe6f6aed )
  471.     ROM_LOAD( "061-1108.bin", 0x070000, 0x10000, 0x26fe71e1 )
  472.  
  473.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  474.     ROM_LOAD( "061-1143.bin", 0x000000, 0x20000, 0x211c1049 )  /* bank 0 (4 bpp)*/
  475.     ROM_LOAD( "061-1144.bin", 0x020000, 0x20000, 0xef62ed2c )
  476.     ROM_LOAD( "061-1145.bin", 0x040000, 0x20000, 0x067ecb8a )
  477.     ROM_LOAD( "061-1146.bin", 0x060000, 0x20000, 0xfea6bc92 )
  478.     ROM_LOAD( "061-1125.bin", 0x080000, 0x10000, 0xc37f24ac )
  479.     ROM_RELOAD(               0x0c0000, 0x10000 )
  480.     ROM_LOAD( "061-1126.bin", 0x090000, 0x10000, 0x015257f0 )
  481.     ROM_RELOAD(               0x0d0000, 0x10000 )
  482.     ROM_LOAD( "061-1127.bin", 0x0a0000, 0x10000, 0xd05417cb )
  483.     ROM_RELOAD(               0x0e0000, 0x10000 )
  484.     ROM_LOAD( "061-1128.bin", 0x0b0000, 0x10000, 0xfba3e203 )
  485.     ROM_RELOAD(               0x0f0000, 0x10000 )
  486.     ROM_LOAD( "061-1147.bin", 0x100000, 0x20000, 0xca4308cf )
  487.     ROM_LOAD( "061-1148.bin", 0x120000, 0x20000, 0x23ddd45c )
  488.     ROM_LOAD( "061-1149.bin", 0x140000, 0x20000, 0xd77cd1d0 )
  489.     ROM_LOAD( "061-1150.bin", 0x160000, 0x20000, 0xa37157b8 )
  490.     ROM_LOAD( "061-1129.bin", 0x180000, 0x10000, 0x294aaa02 )
  491.     ROM_RELOAD(               0x1c0000, 0x10000 )
  492.     ROM_LOAD( "061-1130.bin", 0x190000, 0x10000, 0xdd610817 )
  493.     ROM_RELOAD(               0x1d0000, 0x10000 )
  494.     ROM_LOAD( "061-1131.bin", 0x1a0000, 0x10000, 0xe8e2f919 )
  495.     ROM_RELOAD(               0x1e0000, 0x10000 )
  496.     ROM_LOAD( "061-1132.bin", 0x1b0000, 0x10000, 0xc79f8ffc )
  497.     ROM_RELOAD(               0x1f0000, 0x10000 )
  498.  
  499.     ROM_REGION( 0x004000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  500.     ROM_LOAD( "061-1142.bin", 0x000000, 0x04000, 0xa6ab551f )  /* alpha font */
  501. ROM_END
  502.  
  503.  
  504.  
  505. /*************************************
  506.  *
  507.  *    Driver initialization
  508.  *
  509.  *************************************/
  510.  
  511. static void init_toobin(void)
  512. {
  513.     atarigen_eeprom_default = NULL;
  514.  
  515.     atarijsa_init(1, 2, 1, 0x1000);
  516.  
  517.     /* speed up the 6502 */
  518.     atarigen_init_6502_speedup(1, 0x414e, 0x4166);
  519.  
  520.     /* display messages */
  521.     atarigen_show_sound_message();
  522. }
  523.  
  524.  
  525.  
  526. GAME( 1988, toobin,  0,      toobin, toobin, toobin, ROT270, "Atari Games", "Toobin' (version 3)" )
  527. GAME( 1988, toobin2, toobin, toobin, toobin, toobin, ROT270, "Atari Games", "Toobin' (version 2)" )
  528. GAME( 1988, toobinp, toobin, toobin, toobin, toobin, ROT270, "Atari Games", "Toobin' (Prototype)" )
  529.